export function getCurrentPagePath() {
  const pages = getCurrentPages(); // 获取页面栈
  const currentPage = pages[pages.length - 1]; // 获取当前页面的对象
  return currentPage.route; // 返回当前页面的路径
}

//所在环境
let client = null
// #ifdef H5
//h5_agency ||test_h5_agency
client = 'h5_agency'
// #endif

// #ifdef APP-PLUS
client = 'app_agency'
// #endif
export {
	client
}
// 今日日期 年月日
export function getTodayDate() {
    const now = new Date();
    const year = now.getFullYear();
    const month = (now.getMonth() + 1).toString().padStart(2, '0');
    const day = now.getDate().toString().padStart(2, '0');
    return `${year}-${month}-${day}`;
}


export function getNextMonthDate() {
    const now = new Date();
    const year = now.getFullYear();
    const month = (now.getMonth() + 2).toString().padStart(2, '0');
    const day = now.getDate().toString().padStart(2, '0');
    return `${year}-${month}-${day}`;
}
export function isValidEgyptianPhoneNumber(phoneNumber) {
  const phoneRegex = /^01[0-9]{9}$/;
  return phoneRegex.test(phoneNumber);
}
